package com.orange.eduservice.client;

import com.orange.commonutils.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author orange
 * @email orangestart@yeah.net
 * @create 2021-12-21 17:01
 * ----定义调用的方法路径
 * ----根据视频id删除阿里云视频
 * ----@PathVariable注解不可少
 */
@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {
    //删除单个视频
    @DeleteMapping("/eduVod/video/{videoId}")
    Result removeVideo(@PathVariable("videoId") String videoId);

    //批量删除视频
    @DeleteMapping("/eduVod/video/delete-batch")
    Result removeVideoList(@RequestParam("videoIdList") List<String> videoIdList);
}
